﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Pg.BioMedics.SDR.Entities;
using Pg.BioMedics.SDR.Web.Controls;
using Pg.BioMedics.SDR.Web.Constants;

public partial class Operations_Views_FinishRegisterDocumentView : BaseHostedView
{
    #region Fields

    private Document document;

    #endregion

    #region Event handlers

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected override void LoadParameters(object[] parameters)
    {
        if (parameters.Length == 1)
        {
            if (parameters.First() is Document)
                this.document = parameters.First() as Document;
        }
    }    

    protected void returnLinkButton_Click(object sender, EventArgs e)
    {
        base.Return();
    }

    protected void recordAnnotationLinkButton_Click(object sender, EventArgs e)
    {
        base.Navigate(DocumentsViews.RecordAnnotationView, base.ReturnViewName, this.document);
    }

    protected void uploadAnnotationLinkButton_Click(object sender, EventArgs e)
    {
        base.Navigate(DocumentsViews.UploadAnnotationView, base.ReturnViewName, this.document);
    }

    #endregion

    #region Overriden methods

    protected override object SaveViewState()
    {
        return this.document;
    }

    protected override void LoadViewState(object savedState)
    {
        this.document = savedState as Document;
    }

    #endregion
}
